Machine learning does not automatically solve causal inference problem

Machine learning creates prediction models. However, being able to predict is not equivalent to identifying causal relationships (Causal inference) because many challenges of Causal inference with observational data are still there (e.g., due to the Confounding factors and Collider variables).

See Prosperi2020causal for a review about healthcare applications.